//
//  eyrAddNewUserViewController.m
//  eyr
//
//  Created by Tor Gjøsæter on 4/25/12.
//  Copyright (c) 2012 University of Bergen. All rights reserved.
//

#import "AddNewUserVC.h"


@interface AddNewUserVC ()

@end

@implementation AddNewUserVC
@synthesize addUserTextInputField;



- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    
    
     
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
}

- (void)viewDidUnload
{

    [self setAddUserTextInputField:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (IBAction)addUserTouched:(id)sender {

    UserDao *ud = [UserDao sharedSingleton];
    [ud addUser:addUserTextInputField.text];
     
}
@end
